package day040625;

import java.util.Scanner;

public class Test10 {
    public static void main(String[] args) {
        int month=7;
        int year=2025;
        //month和某个case的值相等，就执行对应的代码，如果后边没有break就继续往后运行(而不会比较)
        switch (month){
            case 2: System.out.println( year%400==0||(year%4==0&&year%100!=0)?"29天":"30天");break;
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12: System.out.println("31天");break;
            case 4:
            case 6:
            case 9:
            case 11: System.out.println("30天");break;
            default: System.out.println("输入有误");
        }
    }
}








